function contain(a) {
    return /^[0-9a-z\_]+$/i.test(a)
}

function isNumber(a) {
    if (0 == a.length) return !1;
    for (i = 0; i < a.length; i++) if (a.charAt(i) < "0" || a.charAt(i) > "9") return !1;
    return !0
}

function checkchineseword(a) {
    var b = /^([\u4e00-\u9fa5])$/;
    return b.test(a)
}

function checknumerrbynick(a) {
    var b = 0;
    if (!(a.length > 0)) return !1;
    for (b = a.length, i = 0; i < a.length; i++) checkchineseword(a.charAt(i)) && b++;
    return b >= 3 && 16 >= b ? !0 : !1
}

function checklength(a) {
    return 0 == a.length || a.length <= 5 || a.length > 15 ? !1 : !0
}

function checkerrbynick(a) {
    var b = /^([0-9a-zA-Z)|([\u4e00-\u9fa5]){3,16}$/;
    return b.test(a)
}

function checkemail(a) {
    var b = /[_a-zA-Z\d\-\.]+@[_a-zA-Z\d\-]+(\.[_a-zA-Z\d\-]+)+$/;
    return b.test(a) ? !0 : !1
}

function CheckUserName() {
    var a = $("#txtUserName").val();
    return "" == a ? (showMsg("通行证不能为空。"), !1) : /^[a-zA-Z]/.test(a) ? a.length < 6 || a.length > 15 ? (showMsg("通行证的长度为6-15位。"), !1) : contain(a) ? !0 : (showMsg("通行证只能包含字母和数字。"), !1) : (showMsg("通行证必须以英文字母开头。"), !1)
}

function CheckPassword() {
    var a = $("#txtPassword").val();
    return "" == a ? (showMsg("密码不能为空。"), !1) : a.length < 6 || a.length > 16 ? (showMsg("请输入6-15位的密码。"), !1) : /^[0-9]+$/.exec(a) || /^[a-zA-z]+$/.exec(a) || /^[\W]+$/.exec(a) ? (showMsg("密码必须为数字、字母或符号的组合。"), !1) : !0
}

function CheckEmail() {
    var a = $("#txtEmail").val();
    return "" == a || "5sing@5sing.com" == a || "请输入邮箱地址" == a ? (showMsg("电子邮箱不能为空。"), !1) : checkemail(a) ? !0 : (showMsg("电子邮箱格式有问题。"), !1)
}